-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding MPI test #518
base: main
Are you sure you want to change the base?
Adding MPI test #518
Conversation
8d782c4
to
b46613f
Compare
409d930
to
b9e0668
Compare
Can you rebase once more? |
@vchuravy @wsmoses The MPI test crashes now. With 1.9 we have the finalizer issue, and with 1.8 the logs and Manifest.toml are attached. |
0f2cbdb
to
6754c67
Compare
Can you open an issue with the error message? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #518 +/- ##
===========================================
+ Coverage 75.39% 93.43% +18.03%
===========================================
Files 35 7 -28
Lines 10653 259 -10394
===========================================
- Hits 8032 242 -7790
+ Misses 2621 17 -2604 ☔ View full report in Codecov by Sentry. |
0e829b9
to
a1745a5
Compare
@michel2323 i rebased this PR with the jll with your fix, if it passes let's merge this! |
@vchuravy this still fails presumably for the need for: #669 from
While I do agree custom rules are good (and we can redo that API to be a custom global invariant rule, the issue of that MPI.Double being hidden behind a separate julia-specific global int is hindering the analysis here (and also likely would for other libXYZ calls potentially, for example CUDA). |
buf = @view x[1:1] | ||
push!(requests, MPI.Isend(x[2:2], MPI.COMM_WORLD; dest=rank-1, tag=0)) | ||
push!(requests, MPI.Irecv!(buf, MPI.COMM_WORLD; source=rank-1, tag=0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
buf = @view x[1:1] | |
push!(requests, MPI.Isend(x[2:2], MPI.COMM_WORLD; dest=rank-1, tag=0)) | |
push!(requests, MPI.Irecv!(buf, MPI.COMM_WORLD; source=rank-1, tag=0)) | |
buf = @view x[1:1] | |
push!(requests, MPI.Isend(x[2:2], MPI.COMM_WORLD; dest=rank - 1, tag=0)) | |
push!(requests, MPI.Irecv!(buf, MPI.COMM_WORLD; source=rank - 1, tag=0)) |
if rank != np-1 | ||
buf = @view x[end:end] | ||
push!(requests, MPI.Isend(x[end-1:end-1], MPI.COMM_WORLD; dest=rank+1, tag=0)) | ||
push!(requests, MPI.Irecv!(buf, MPI.COMM_WORLD; source=rank+1, tag=0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
if rank != np-1 | |
buf = @view x[end:end] | |
push!(requests, MPI.Isend(x[end-1:end-1], MPI.COMM_WORLD; dest=rank+1, tag=0)) | |
push!(requests, MPI.Irecv!(buf, MPI.COMM_WORLD; source=rank+1, tag=0)) | |
if rank != np - 1 | |
buf = @view x[end:end] | |
push!(requests, | |
MPI.Isend(x[(end - 1):(end - 1)], MPI.COMM_WORLD; dest=rank + 1, tag=0)) | |
push!(requests, MPI.Irecv!(buf, MPI.COMM_WORLD; source=rank + 1, tag=0)) |
n = np*10 | ||
n1 = Int(round(rank / np * (n+np))) - rank | ||
n2 = Int(round((rank + 1) / np * (n+np))) - rank | ||
nl = rank == 0 ? n1+1 : n1 | ||
nr = rank == np-1 ? n2-1 : n2 | ||
nlocal = nr-nl+1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
n = np*10 | |
n1 = Int(round(rank / np * (n+np))) - rank | |
n2 = Int(round((rank + 1) / np * (n+np))) - rank | |
nl = rank == 0 ? n1+1 : n1 | |
nr = rank == np-1 ? n2-1 : n2 | |
nlocal = nr-nl+1 | |
n = np * 10 | |
n1 = Int(round(rank / np * (n + np))) - rank | |
n2 = Int(round((rank + 1) / np * (n + np))) - rank | |
nl = rank == 0 ? n1 + 1 : n1 | |
nr = rank == np - 1 ? n2 - 1 : n2 | |
nlocal = nr - nl + 1 |
fill!(context.x, Float64(rank)) | ||
halo(context) | ||
if rank != 0 | ||
@test context.x[1] == Float64(rank-1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
@test context.x[1] == Float64(rank-1) | |
@test context.x[1] == Float64(rank - 1) |
if rank != np-1 | ||
@test context.x[end] == Float64(rank+1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
if rank != np-1 | |
@test context.x[end] == Float64(rank+1) | |
if rank != np - 1 | |
@test context.x[end] == Float64(rank + 1) |
try | ||
include("mpi.jl") | ||
mpiexec() do cmd | ||
run(`$cmd -n 2 $(Base.julia_cmd()) --project=$testdir $testdir/mpi.jl`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
run(`$cmd -n 2 $(Base.julia_cmd()) --project=$testdir $testdir/mpi.jl`) | |
return run(`$cmd -n 2 $(Base.julia_cmd()) --project=$testdir $testdir/mpi.jl`) |
end | ||
@test mpi_test | ||
end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
test/runtests.jl
Outdated
b = Float64[11, 13] | ||
db = zero(b) | ||
|
||
forward, pullback = Enzyme.autodiff_thunk(ReverseSplitNoPrimal, Const{typeof(\)}, Duplicated, Duplicated{typeof(A)}, Duplicated{typeof(b)}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
forward, pullback = Enzyme.autodiff_thunk(ReverseSplitNoPrimal, Const{typeof(\)}, Duplicated, Duplicated{typeof(A)}, Duplicated{typeof(b)}) | |
forward, pullback = Enzyme.autodiff_thunk(ReverseSplitNoPrimal, Const{typeof(\)}, | |
Duplicated, Duplicated{typeof(A)}, | |
Duplicated{typeof(b)}) |
test/runtests.jl
Outdated
|
||
db = zero(b) | ||
|
||
forward, pullback = Enzyme.autodiff_thunk(ReverseSplitNoPrimal, Const{typeof(\)}, Duplicated, Const{typeof(A)}, Duplicated{typeof(b)}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
forward, pullback = Enzyme.autodiff_thunk(ReverseSplitNoPrimal, Const{typeof(\)}, Duplicated, Const{typeof(A)}, Duplicated{typeof(b)}) | |
forward, pullback = Enzyme.autodiff_thunk(ReverseSplitNoPrimal, Const{typeof(\)}, | |
Duplicated, Const{typeof(A)}, | |
Duplicated{typeof(b)}) |
test/runtests.jl
Outdated
|
||
dA = zero(A) | ||
|
||
forward, pullback = Enzyme.autodiff_thunk(ReverseSplitNoPrimal, Const{typeof(\)}, Duplicated, Duplicated{typeof(A)}, Const{typeof(b)}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
forward, pullback = Enzyme.autodiff_thunk(ReverseSplitNoPrimal, Const{typeof(\)}, Duplicated, Duplicated{typeof(A)}, Const{typeof(b)}) | |
forward, pullback = Enzyme.autodiff_thunk(ReverseSplitNoPrimal, Const{typeof(\)}, | |
Duplicated, Duplicated{typeof(A)}, | |
Const{typeof(b)}) |
I get this now on the most recent Enzyme build:
This is the request issue @vchuravy mentioned. How do we proceed with MPI in Julia? Should we start an Enzyme extension for MPI/MPI extension for Enzyme? |
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
Let me know if you want to keep the trailing whitespaces.